import EventRoute from "./EventRoute"
import SystemProductCategoryService from "../service/SystemProductCategoryService";

const routes = new Array();
const systemProductCategoryService = new SystemProductCategoryService();
/**
 * 产品分类分页
 */
routes.push(
    new EventRoute('app-productcat-page', 'event', async (api, data = {}) => {
        systemProductCategoryService.page(data.data)
    })
)

/**
 * 产品分类添加
 */
routes.push(
    new EventRoute('app-productcat-add', 'event', async (api, data = {}) => {
        systemProductCategoryService.save(data.data)
    })
)

/**
 * 产品分类修改
 */
routes.push(
    new EventRoute('app-productcat-update', 'event', async (api, data = {}) => {
        systemProductCategoryService.updateById(data.data)
    })
)

/**
 * 产品分类删除
 */
routes.push(
    new EventRoute('app-productcat-delete', 'event', async (api, data = {}) => {
        systemProductCategoryService.deleteById(data.data)
    })
)

routes.push(
    new EventRoute('app-productcat-all', 'event', async (api, data = {}) => {
        systemProductCategoryService.all()
    })
)


export default routes;
